﻿using Domain.Entities.ToDo;
using FluentMigrator;
using FrameworkCore.Extensions;

namespace AiBLSmartEdu.Module.ToDo.API.Migrations;

[Migration(202410161715)]
public class ToDoAddCompletedTime : ForwardOnlyMigration
{
    public override void Up()
    {
        Alter.Table(MigrationExpressions.GetTableName(typeof(ToDoItem)))
           .AddColumn(MigrationExpressions.ColumnNameFor<ToDoItem>(nameof(ToDoItem.CompletedTime))).AsDateTime().Nullable().WithDefaultValue(null).WithColumnDescription("任务完成时间。");
    }
}
